/** @format */

import React from 'react'
import AudioPlayer from './index'

// "https://wsaudiobssdlbig.kugou.com/2005182150/bYVOtpowNaFUGIU-7upiBw/1589896205/bss/extname/wsaudio/d48fdac0ed5253cca403974000da1e7d.mp3"

interface IState {
  // 自动播放
  autoplay: boolean
  // 循环播放
  loop: boolean
  // 是否静音
  muted: boolean
  //
  preload: 'none' | 'metadata' | 'auto' | ''
  //
  src: string
}

type Props = {}
type State = {}
class AudioPlayerTest extends React.Component<Props, State> {
  constructor(props: Props) {
    super(props)
  }

  getAudioState(obj:any){
  }

  render(): JSX.Element {
    return (
      <AudioPlayer
        config={{
          src:
            'https://wsaudiobssdlbig.kugou.com/2005182150/bYVOtpowNaFUGIU-7upiBw/1589896205/bss/extname/wsaudio/d48fdac0ed5253cca403974000da1e7d.mp3',
          autoplay:true
        }}
        getAudioState={(obj) => this.getAudioState(obj)}
      />
    )
  }
}

export default AudioPlayerTest
